package com.cat.graphTheory;

/**
 * @author 曲大人的喵
 * @description https://leetcode.cn/problems/number-of-provinces/description/
 * @create 2025/9/4 13:21
 * @since JDK17
 */

public class Solution01 {
    boolean[] vis;
    int[][] arr, d = new int[][]{{-1, 0}, {1, 0}, {0, -1}, {0, 1}};
    int n;
    void dfs(int i) {

    }
    public int findCircleNum(int[][] isConnected) {
        int n = isConnected.length, ans = 0;
        vis = new boolean[n];
        arr = isConnected;
        for (int i = 0; i < n; i++) {
            if (!vis[i]) {
                ans++;
                dfs(i);
            }
        }

        return ans;
    }
}
